package cn.com.wangluotongxin.admin.model.es;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

@Data
@Document(indexName = "es_admin_user_chat")
public class EsAdminUserChat {

    @Id
    @ApiModelProperty("主键ID")
    private Integer id;

    @ApiModelProperty("发送方ID")
    @Field(type = FieldType.Integer)
    private Integer sendUserId;

    @ApiModelProperty("发送方名称")
    @Field(type = FieldType.Text)
    private String sendUserName;

    @ApiModelProperty("接收方ID")
    @Field(type = FieldType.Integer)
    private Integer receiveUserId;

    @ApiModelProperty("接收方名称")
    @Field(type = FieldType.Text)
    private String receiveUserName;

    @ApiModelProperty("消息内容")
    @Field(type = FieldType.Text)
    private String content;

    @ApiModelProperty("创建时间")
    @Field(type = FieldType.Date)
    private Date createTime;
}
